home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / flilib.zip / FLISRC.ZIP / JSEEK.C < prev    next >
C/C++ Source or Header  |  1990-02-26  |  391b  |  21 lines

  1.  
  2. #include "aai86.h"
  3. #include "aados.h"
  4.  
  5.  
  6. /* Reposition file pointer */
  7. long dos_seek (Jfile f, long offset, int mode)
  8. {
  9. union i86_regs reg;
  10.  
  11. reg.b.ah = 0x42;
  12. reg.b.al = mode;
  13. reg.w.bx = f;
  14. reg.w.cx = i86_ptr_seg((void *)offset);
  15. reg.w.dx = i86_ptr_offset((void *)offset);
  16. if (i86_sysint(0x21,®,®)&1) 
  17.     return(-1);
  18. else
  19.     return(i86_make_long(reg.w.ax, reg.w.dx));
  20. }
  21.